﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CAP.Mathematics
{
    /// <summary>
    /// Diese Klasse unterstützt die Winkelberechnung.
    /// </summary>
    public static class Converter
    {
        #region Winkel
        /// <summary>
        /// Rechnet den angegebenen Winkel in einen Bogenmaßwert um.
        /// </summary>
        /// <param name="Deg">Der Winkel.</param>
        /// <returns>Der Bogenmaßwert.</returns>
        public static double ToRAD(double Deg)
        {
            return Deg / 180.0 * Math.PI;
        }

        /// <summary>
        /// Rechnet den angegeben Bogenmaßwert in einen Winkel um.
        /// </summary>
        /// <param name="Rad">Der Bogenmaßwert.</param>
        /// <returns>Der Winkel.</returns>
        public static double ToDEG(double Rad)
        {
            return Rad * 180.0 / Math.PI;
        }
        #endregion Winkel
    }
}
